package operate;

import book.BookList;

/**
 * Created with IntelliJ IDEA
 * Description:
 * User: Administrator
 * Data: 2023 - 05 - 10
 * Time: 20:56
 */
public class ExitOperate implements IOperation{
    @Override
    public void work(BookList bookList) {
        int currentNums = bookList.getBooknumbers();
        for (int i = 0; i < currentNums; i++) {
            bookList.setBook(i, null);
        }
        bookList.setBooknumbers(0);
        System.out.println("退出系统成功");
        System.exit(0);
    }
}
